package 第十周.homework;//*******************************************************************
//  MagazineRack.java       Author: Lewis/Loftus
//
//  Driver to exercise the MagazineList collection.
//*******************************************************************

import 第十周.practice.Magazine;

public class MagazineRack
{
   //----------------------------------------------------------------
   //  Creates a MagazineList object, adds several magazines to the
   //  list, then prints it.
   //----------------------------------------------------------------
   public static void main(String[] args)
   {
      MagazineList1 rack1 = new MagazineList1();
      rack1.add(new Magazine("Time"));
      rack1.add(new Magazine("Woodworking Today"));
      rack1.add(new Magazine("Communications of the ACM"));
      rack1.add(new Magazine("House and Garden"));
      rack1.add(new Magazine("GQ"));
      rack1.insert(0,new Magazine("Happy life"));
      rack1.insert(6,new Magazine("healthy"));
      rack1.insert(4,new Magazine("goodnight"));
      rack1.delete(new Magazine("healthy"));
      rack1.Sort();
     System.out.println(rack1);
   }
}
